poetic justice
noun
°The rewarding of virtue, and the punishment of vice, especially in an ironic manner.
synonyms: just deserts, payback